(function ($) {
    $(document).ready(function () {
        function village_plant_load (id,table_name,plant_name,area,acre_yield,price) {
            var html ='<div class="fertilization-div '+id+'"><div class="fertilization-title">' +plant_name+
                '<span class="fertilization-delete" onclick="ajax_table_delete_item(\''+'/village/plant/list/delete'+'\',\''+id+'\')">-</span></div>' +
                '<ul><li>作物:'+plant_name+'</li>' +
                '<li>种植面积(亩):'+area+'</li>' +
                '<li>亩产量:'+acre_yield+'</li>' +
                '<li>价格（元/千克）:'+price+'</li></ul></div>';
            jQuery('.add-fertilization-div').before(html);
        }
        $(".village-plant-sub").each(function(){
            village_plant_load($(this).attr("f_id"),
                'village_plant',
                $(this).attr("f_plant_name"),
                $(this).attr("f_area"),
                $(this).attr("f_acre_yield"),
                $(this).attr("f_price"));
        });
    })
})(jQuery);

